import smtplib  
import sys
  
fromaddr = 'sever57@gmail.com'  
toaddrs  = 'cedric@bettinger.biz'  
msg = 'Subject : sujet \nThere was a terrible error that occured and I wanted you to know!'  
  
# Credentials (if needed)  
username = 'bcedrix'  
password = sys.argv[1]
  
# The actual mail send  
server = smtplib.SMTP('smtp.gmail.com:587')  
server.starttls()  
server.login(username, password)  
server.sendmail(fromaddr, toaddrs, msg)  
server.quit() 
